Integrand size = 24, antiderivative size = 102 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=\frac {3 a^4 \sin (c+d x)}{35 d}-\frac {a^4 \sin ^3(c+d x)}{35 d}-\frac {2 i a \cos ^7(c+d x) (a+i a \tan (c+d x))^3}{7 d}-\frac {2 i \cos ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{35 d} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3577, 2713} \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=-\frac {a^4 \sin ^3(c+d x)}{35 d}+\frac {3 a^4 \sin (c+d x)}{35 d}-\frac {2 i \cos ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{35 d}-\frac {2 i a \cos ^7(c+d x) (a+i a \tan (c+d x))^3}{7 d} \]
[In]
[Out]
Rule 2713
Rule 3577
Rubi steps \begin{align*} \text {integral}& = -\frac {2 i a \cos ^7(c+d x) (a+i a \tan (c+d x))^3}{7 d}+\frac {1}{7} a^2 \int \cos ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx \\ & = -\frac {2 i a \cos ^7(c+d x) (a+i a \tan (c+d x))^3}{7 d}-\frac {2 i \cos ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{35 d}+\frac {1}{35} \left (3 a^4\right ) \int \cos ^3(c+d x) \, dx \\ & = -\frac {2 i a \cos ^7(c+d x) (a+i a \tan (c+d x))^3}{7 d}-\frac {2 i \cos ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{35 d}-\frac {\left (3 a^4\right ) \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{35 d} \\ & = \frac {3 a^4 \sin (c+d x)}{35 d}-\frac {a^4 \sin ^3(c+d x)}{35 d}-\frac {2 i a \cos ^7(c+d x) (a+i a \tan (c+d x))^3}{7 d}-\frac {2 i \cos ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{35 d} \\ \end{align*}
Time = 0.61 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.77 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=\frac {a^4 (-i \cos (3 (c+d x))+\sin (3 (c+d x))) \left (35 \sqrt {\cos ^2(c+d x)}+8 \left (4+7 \sqrt {\cos ^2(c+d x)}\right ) \cos (2 (c+d x))+\left (32+5 \sqrt {\cos ^2(c+d x)}\right ) \cos (4 (c+d x))-32 i \sin (2 (c+d x))-14 i \sqrt {\cos ^2(c+d x)} \sin (2 (c+d x))-32 i \sin (4 (c+d x))+5 i \sqrt {\cos ^2(c+d x)} \sin (4 (c+d x))\right )}{280 d \sqrt {\cos ^2(c+d x)}} \]
[In]
[Out]
Time = 131.89 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.73
method | result | size |
risch | \(-\frac {i a^{4} {\mathrm e}^{7 i \left (d x +c \right )}}{56 d}-\frac {3 i a^{4} {\mathrm e}^{5 i \left (d x +c \right )}}{40 d}-\frac {i a^{4} {\mathrm e}^{3 i \left (d x +c \right )}}{8 d}-\frac {i a^{4} {\mathrm e}^{i \left (d x +c \right )}}{8 d}\) | \(74\) |
derivativedivides | \(\frac {a^{4} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{4}\left (d x +c \right )\right )}{7}-\frac {3 \sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{35}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{35}\right )-4 i a^{4} \left (-\frac {\left (\cos ^{5}\left (d x +c \right )\right ) \left (\sin ^{2}\left (d x +c \right )\right )}{7}-\frac {2 \left (\cos ^{5}\left (d x +c \right )\right )}{35}\right )-6 a^{4} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )}{7}+\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {4 i a^{4} \left (\cos ^{7}\left (d x +c \right )\right )}{7}+\frac {a^{4} \left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )}{7}}{d}\) | \(203\) |
default | \(\frac {a^{4} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{4}\left (d x +c \right )\right )}{7}-\frac {3 \sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{35}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{35}\right )-4 i a^{4} \left (-\frac {\left (\cos ^{5}\left (d x +c \right )\right ) \left (\sin ^{2}\left (d x +c \right )\right )}{7}-\frac {2 \left (\cos ^{5}\left (d x +c \right )\right )}{35}\right )-6 a^{4} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )}{7}+\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {4 i a^{4} \left (\cos ^{7}\left (d x +c \right )\right )}{7}+\frac {a^{4} \left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )}{7}}{d}\) | \(203\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.61 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=\frac {-5 i \, a^{4} e^{\left (7 i \, d x + 7 i \, c\right )} - 21 i \, a^{4} e^{\left (5 i \, d x + 5 i \, c\right )} - 35 i \, a^{4} e^{\left (3 i \, d x + 3 i \, c\right )} - 35 i \, a^{4} e^{\left (i \, d x + i \, c\right )}}{280 \, d} \]
[In]
[Out]
Time = 0.29 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.53 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=\begin {cases} \frac {- 2560 i a^{4} d^{3} e^{7 i c} e^{7 i d x} - 10752 i a^{4} d^{3} e^{5 i c} e^{5 i d x} - 17920 i a^{4} d^{3} e^{3 i c} e^{3 i d x} - 17920 i a^{4} d^{3} e^{i c} e^{i d x}}{143360 d^{4}} & \text {for}\: d^{4} \neq 0 \\x \left (\frac {a^{4} e^{7 i c}}{8} + \frac {3 a^{4} e^{5 i c}}{8} + \frac {3 a^{4} e^{3 i c}}{8} + \frac {a^{4} e^{i c}}{8}\right ) & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.46 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=-\frac {20 i \, a^{4} \cos \left (d x + c\right )^{7} + 4 i \, {\left (5 \, \cos \left (d x + c\right )^{7} - 7 \, \cos \left (d x + c\right )^{5}\right )} a^{4} + 2 \, {\left (15 \, \sin \left (d x + c\right )^{7} - 42 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3}\right )} a^{4} + {\left (5 \, \sin \left (d x + c\right )^{7} - 7 \, \sin \left (d x + c\right )^{5}\right )} a^{4} + {\left (5 \, \sin \left (d x + c\right )^{7} - 21 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3} - 35 \, \sin \left (d x + c\right )\right )} a^{4}}{35 \, d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1327 vs. \(2 (86) = 172\).
Time = 0.76 (sec) , antiderivative size = 1327, normalized size of antiderivative = 13.01 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=\text {Too large to display} \]
[In]
[Out]
Time = 4.93 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.82 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=-\frac {2\,a^4\,\left (35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,105{}\mathrm {i}-210\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,210{}\mathrm {i}+147\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,49{}\mathrm {i}-12\right )}{35\,d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,7{}\mathrm {i}+21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,35{}\mathrm {i}-35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,21{}\mathrm {i}+7\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )} \]
[In]
[Out]